home *** CD-ROM | disk | FTP | other *** search
- /**
- Citadel Email Network Processing V 1.00
- Requirements:
- 0) ARexx
- 1) Miami installed
- 2) Citadel and Email Tools installed
- a) MSGOUT
- b) SAVE_FILE
- 3) YAM installed, version 1.3.4 required
- 4) This script must run from the Citadel Home Area
-
- Operation:
- Citadel is shutdown.
- YAM is started if it is not already running.
- Miami is started if it is not already running
- Miami is brought online, up to 5 attempts are made to
- go online. This means that if you configure Miami to
- dial 2 numbers, 10 times each, it will do this 5 times
- (dial out 100 times to connect) before giving up. Being
- online is not a requirement for "sending", we queue up
- the mail for later and it will go out the next time.
- MSGOUT is used to create a network packet which is then
- compressed. Then using YAM AREXX commands of MAILWRITE,
- SETFOLDER, WRITESUBJECT, and WRITEATTACH, the mail message
- is placed in the outgoing folder. The mail is queued
- so that if we are not online for some reason, it will be
- done anyway.
-
- Next, Mail is gathered from the ISP via YAM and then
- filtered. Filtering saves a little work by putting all the
- Email Network Packets into a directory, the CIMR tool
- is used in the script "mail.script" to pull out the
- attached file so that MSGADD can be used to enter the
- messages into Citadel.
-
- The last part is cleanup, close the windows, go offline
- and restart Citadel.
- */
- say "Email Networking Started - " DATE('W') "," DATE('N') "," TIME('N')
- call TIME('R')
-
- call addlib('rexxsupport.library',0,-30,0)
-
- /**
- Citadel Shutdown
- **/
- say "Shutting down Citadel if needed"
- OPTIONS RESULTS
- IF show('P','Citadel_68K') then DO
- say "...Attempting Citadel shutdown"
- ADDRESS "Citadel_68K"
- "exit 1"
- END
- say "Done with Citadel shutdown"
- call delay(100)
- /**
- YAM Startup
- **/
- say "YAM Startup if needed"
- if ~show('P','YAM') then do
- say "...Attempting to startup YAM"
- address command 'run yam:yam nocheck'
- call delay(100)
- address command 'waitforport YAM'
- if ~show('P','YAM') then do
- say "......YAM startup failed!"
- exit
- end
- end
-
- /**
- Miami Startup
- **/
- say "Miami startup if needed"
- if ~show('P','MIAMI.1') then do
- say "...Starting up Miami"
- address command 'run miami:miami'
- call delay(100)
- address command 'waitforport MIAMI.1'
- if ~show('P','MIAMI.1') then do
- say "......Couldn't run MIAMI, Aborting!"
- exit
- end
- end
-
- /**
- Create a network packet
- **/
- say "Creating a network packet for Kronos"
- address command
- 'wait 3 sec'
- 'failat 100'
- 'delete amiga.zip amiga'
- 'msgout "Kronos" amiga'
- 'zip -q amiga.zip amiga'
- 'save_file amiga cit:net/net_save'
- email = 'cit-amiga@kronos.incentre.net'
- filename = 'cit:amiga.zip'
-
- /**
- Now, we send a network packet
- **/
- say "Queueing the packet for KRONOS"
- address 'YAM'
- setfolder 1
- MailWrite
- WriteMailTo email
- 'WriteSubject "The Amiga Zone US (609) 953-8159"'
- WriteAttach filename '"Email_Network_Packet" "UU" "application/octet-stream"'
- WriteQueue
- address command
- 'delete cit:amiga.zip'
-
- /**
- Create a network packet for UNCENSORED
- **/
- say "Creating the packet for UNCENSORED"
- address command
- 'failat 100'
- 'delete uncensored.zip uncensored'
- 'msgout "uncensored" uncensored'
- email = 'cit86net@uncnsrd.mt-kisco.ny.us'
- filename = 'cit:uncensored'
-
- /**
- Now, we send up a network packet
- **/
- say "Queueing the packet for UNCENSORED"
- address 'YAM'
- setfolder 1
- MailWrite
- WriteMailTo email
- 'WriteSubject "US6099538159"'
- WriteAttach filename '"Email_Network_Packet" "UU" "application/octet-stream"'
- WriteQueue
- address command
- 'save_file uncensored cit:net/net_save'
-
- /**
- Finished, with networking
- **/
-
- say "Make sure we are online"
- address 'MIAMI.1' /* Miami is up and running now...*/
- 'HIDE'
- 'ISONLINE'
- if rc = 0 then do
- say "... Not online, attempting to connect"
- do i=0 to 5
- 'ONLINE' /* Go online */
- 'ISONLINE' /* Did it succeed ? */
- if rc = 1 then leave /* exit loop if online */
- end
- 'ISONLINE'
- if rc = 0 then do
- say "......Unable to get online, Mail will be processed next time!"
- end
- end
-
- /**
- Now, get standard mail & filter it
- **/
- Address YAM
- MailCheck /* Get new mail */
-
- if rc = -1 then
- say "YAM: connection to mail server has failed, could not get new mail"
-
- MailFilter /* Filter, it */
- MailSendAll /* Send queue */
- if rc = -1 then
- say "YAM: connection to mail server has failed, could not send new mail"
-
- /**
- process the mail recieved, Note: mail.script is dependant
- on YAM, and the YAM characteristic of Archives. We are directly
- accessing the mail files and deleting them in the script after
- processing the attached files. Possibly, with Version 2.00 this
- will become ARexx, it would be alot cleaner.
- **/
-
- address command
- 'execute cit:mail.script'
- address YAM
- setfolder 0 /* select the folder and update the index */
- MailUpdate
- setfolder 1
- MailUpdate
- setfolder 2
- MailUpdate
- setfolder 3
- MailUpdate
- setfolder 4
- MailUpdate
- setfolder 5
- MailUpdate
- setfolder 6
- MailUpdate
- setfolder 7
- MailUpdate
- setfolder 8
- MailUpdate
- Hide /* close the window */
-
- /**
- Now go offline with Miami and restart Citadel
- We leave YAM and Miami running.
- **/
- address 'MIAMI.1'
- 'OFFLINE'
- HIDE
-
- /**
- Finished
- **/
- say "Elapsed time:" TIME('E')
- say "Email Networking completed - " DATE('W') "," DATE('N') "," TIME('N')
- exit
-